const $http = window.$http
//列表
export function getPage (params) {
  return $http.request({
    url: '/warnings/superviseMessage/getByPage',
    data: params,
    method: 'post'
    // modules: "file-mod"
  })
}
export function getTenantList (params) {
  return $http.request({
    url: '/supervise/tenant/getLoginTenant',
    method: 'get'
    // modules: "file-mod"
  })
}
// 列表删除
export function deleteTextMessage (id) {
  return $http.request({
    url: `/file/textMessage/deleteTextMessage/${id}`,
    method: 'DELETE',
    modules: 'file-mod'
  })
}
// 详情
export function detailTextMessage (id) {
  return $http.request({
    url: `/warnings/superviseMessage/getInfoById?id=${id}`,
    method: 'get'
  })
}
// 已读
export function pressRead (data) {
  return $http.request({
    url: `/file/textMessage/pressRead`,
    method: 'put',
    data
  })
}

// 新建短报文
export function addTextMsg (data) {
  return $http.request({
    url: `/warnings/superviseMessage/save`,
    method: 'post',
    data
  })
}

// 修改或者发送
export function updateReply (data) {
  return $http.request({
    url: `/warnings/superviseMessage/update`,
    method: 'post',
    data
  })
}
